STEP 5: Let's set up the random variable for our program.

We use a variable to hold the random value. We'll change the arguments to get a number between 1 and 4.

  • Change the random variable's name from my_var to rand_answer.
  • Change the variable argument in .Display() from my_var to rand_answer.
  • Change the second integer in .randint() from 10 to 4.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)